package com.rc.gongr.pojo;

import java.util.Date;

/**
 * This object is the heart of gongr, the gong post.
 *
 * @author Andrew Bell
 */
public class Gong {
    private String comment;
    private Date timestamp;

    /**
     * Empty constructor
     */
    public Gong() {
    }

    /**
     * Creates gong with the comment text and the timestamp
     *
     * @param comment       String of the comment text
     * @param newTimestamp  Date timestamp
     */
    public Gong(String comment, Date newTimestamp) {
        this.comment = comment;
        this.timestamp = newTimestamp;
    }

    /**
     * Gets comment from gong
     *
     * @return comment string
     */
    public String getComment() {
        return comment;
    }

    /**
     * Sets comment
     *
     * @param comment   String comment
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    /**
     * Gets Date object of timestamp
     *
     * @return Date post was timestamped
     * @see Date
     */
    public Date getTimestamp() {
        return timestamp;
    }

    /**
     * sets timestamp via a Date object
     *
     * @param timestamp Date timestamp
     * @see Date
     */
    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }
}
